define(['text!service/instructions.html'],
	function(viewTemplate) {
		return Piece.View.extend({
			id: 'service_instructions',
			events: {
				"click .csair-btn-lite": "submit1",
				"click #right": "right",
			},
			render: function() {
				$(this.el).html(viewTemplate);

				Piece.View.prototype.render.call(this);
				return this;
			},
			onShow: function() {
				//write your business logic here :)

				var windowHeight = $(window).height();
				var elTop = $("#instructions").offset().top;
				var elHeight = windowHeight - elTop - 35;

				console.info(elHeight);
				$("#instructions").css({
					"height": elHeight
				});
				new iScroll($("#instructions")[0]);
			},
			submit1: function() {


				this.container.navigateForResult('/service/instructionsList', {
					trigger: true
				}, 'service/instructions', this.onGotResult);


			}
		}); //view define

	});